<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        #container {
            width: 500px;
            height: 300px;
        }

        #container .menu {
            width: 100px;
            text-align: center;
            color: #000;
            height: 200px;
            background: #ccc;
            position: absolute;
        }

        .title {
            display: flex;
            align-items: center;
        }

        .title li {
            text-align: center;
            flex: 1;
            /*宽度平均分*/
            padding: 10px 0;
            cursor: pointer;
        }

        .title li.active {
            border-bottom: 3px solid red;
            color: red;
        }

        .content li {
            display: none;
        }

        .content li.show {
            display: block;
        }
    </style>
</head>

<body>
    <div id="container">
        <ul class="title">
            <li class="active">火车票</li>
            <li>汽车票</li>
            <li>飞机票</li>
        </ul>
        <ul class="content">
            <li class="show">111111111111111111111111</li>
            <li>22222222222222222222222</li>
            <li>3333333333333333333333333333</li>
        </ul>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.10.0/jquery.js"></script>
    <script>

        $('.title li').click(function () {
            $(this).addClass("active").siblings().removeClass('active')
            $('.content li').eq($(this).index()).show().siblings().hide()
        })

    </script>
</body>

</html>